import Vue from 'vue'
import VueRouter from 'vue-router'
import Exercise from '@/views/Exercise'
import Find from '@/views/Find'
import Layout from '@/views/Layout'
import Login from '@/views/Login'
import My from '@/views/My'
import World from '@/views/World'
Vue.use(VueRouter)

const routes = [
  { path: '/', redirect: '/World' },
  {
    path:'/', 
    name:'Layout', 
    component:Layout,
    children:[
      {path:'Exercise', name:'Exercise', component:Exercise},
      {path:'Find', name:'Find', component:Find},
      {path:'My', name:'My', component:My},
      {path:'World', name:'World', component:World},
    ]
  },
  {path:'/Login', name:'Login', component:Login}
]

const router = new VueRouter({
  routes
})

export default router
